home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / SOUND / SCK_SP23.ZIP / SP.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  894 b   |  42 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <fcntl.h>
  4. #include <conio.h>
  5. #include <io.h>
  6. #include <dos.h>
  7. #include <string.h>
  8. #include <malloc.h>
  9. #include <math.h>
  10. #include "c:\wc\myh\macro.h"
  11.  
  12.         byte *modplace;
  13.         int handle;
  14.         int bela;
  15.  
  16. void AllocateMem() {
  17.         modplace  = (byte *)malloc(1000000);
  18.     }
  19.                           
  20. #include "sp32.h"
  21.  
  22. void DeAllocateMem() {
  23.         free(modplace);
  24.     }
  25.  
  26. void main(int argc,char *argv[]) {
  27.         if(argc==2){
  28.     AllocateMem();
  29.         handle = open (argv[1], O_RDONLY | O_BINARY);
  30.         read(handle, modplace, 1000000);
  31.         close(handle);
  32.         SP_START(modplace);
  33.         PLAYER();
  34. //        while(!kbhit()) {
  35. //                        POLLMUSIC();
  36. //                        }
  37.         SP_STOP();
  38.     DeAllocateMem();
  39.         }
  40.         else printf("Usage: SP32 <s3mname>");
  41. }
  42.